@extends('layouts.home.layout')

@section('content')

    @include('layouts.home._nav')

    @include('layouts.home._banner')

    <div class="cptitle main">
        <div class="jtilt"><p>产品列表</p></div>
    </div><!--cptitle-->


    <ul class="rmul main">

        @foreach($product as $key=>$val)
            <li>
                <div class="rmtop"><img src="/home{{$val->imgurl}}" /><p id="{{$val->color}}">{{$val->name}}</p></div>
                <p class="rm_p">贷款月利率：{{$val->rate}}<br />
                    贷款金额：{{$val->fee}}<br />
                    贷款期限：{{$val->time}}</p>
                <button type="button" onclick="toApply({{$val->id}})">立即申请</button>
            </li>
        @endforeach

    </ul><!--rmul-->


@endsection
@section('js')
    <script>
        function toApply(id) {
            //window.location.href = "http://www.51finace.com/apply/onestep" + '?productid=' + id;
            window.location.href = "{{url('apply/onestep')}}"+'?productid='+id;
        }
    </script>
@endsection